package model

import (
	"gitee.com/liukexing/mqbroker/core/typedef"
	"net/http"
	"sync"
	"time"
)

type HttpWait struct {
	Data HttpRequestData
	Reply chan HttpReplyData
	TimeOut time.Time
	Wait  *sync.WaitGroup
	Send *sync.Once
}

type HttpRequestConfig struct {
	Path      string
	Method    []string
	Receiver  typedef.ModuleInfo
	TopicName string
}
type HttpRequestData struct {
	Method           string
	Proto            string
	Header           http.Header
	Body             []byte
	ContentLength    int64
	TransferEncoding []string
	Host             string
	Path             string
	RawQuery         string
	Cookies          []*http.Cookie
}
type HttpReplyData struct {
	ReqID   string
	StatusCode int
	Header  http.Header
	Content []byte
	Cookies []*http.Cookie
}
